#include <iostream>
#include <mysql/mysql.h>
#include "StdMysql.h"

int main()
{
#if 0
    stdMysql sql;
    if(!sql.Connect("192.168.85.129", "root", "123456", "mytest", 3306))
    {
        return -1;
    }
    
    StrArray sqlVec;
    sqlVec.push_back("update student set sex = '女' where id = 1;");
    sqlVec.push_back("update student set sex = '张三' where id = 2;");
    sql.ExecuteTransaction(sqlVec);
    // mysql//
#endif
    MYSQLPOOL->SetParams(10, "192.168.85.129", "root", "123456", "mytest", 3306);

    auto Array = MYSQLPOOL->GetMysql()->GetTableInfo("select * from student");
    for(auto &StrArray:Array)
    {
        for(auto &str : StrArray)
        {
            std::cout<<str<<" ";
        }
        std::cout<<std::endl;
    }

    
    return 0;
    
}